/*
 * inode_map_address - get the inode_map address of the file named seg_file_name
 * @param  seg_file_name  the name of the last modified segment file
 * @return Return the inode map address of the file named seg_file_name
 */
int
inode_map_address(char *seg_file_name)
{   
    int fd;
	int address;
		 
	fd = open(seg_file_name, O_RDONLY);
		
	if(fd == -1)
	{
		perror("open error!");
		exit(1);
	}
				 
	address = lseek(fd, 0, SEEK_END) - sizeof(struct lhdfs_inode_map);
				
	return address;
}

